package d2;
import java.util.*;
public class Day3 {


    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        List<Integer> tmp = new ArrayList<>();
    }
    /*public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
        List<List<Integer>> ret = new ArrayList<>();
        if(root==null) return ret;
        Queue<TreeNode> queue = new LinkedList<>();
        queue.add(root);
        int level = 1;
        while(!queue.isEmpty()) {
            int size = queue.size();//记录当前层有多少个节点
            List<Integer> tmp = new ArrayList<>();
            for(int i=size;i>0;i--) {
                TreeNode node = queue.poll();
                tmp.add(node.val);
                if(node.left!=null) queue.add(node.left);
                if(node.right!=null) queue.add(node.right);
            }
            if(level%2==0) Collections.reverse(tmp);
            ret.add(tmp);
            level++;
        }
        return ret;
    }*/
}
